<template>
  <el-card>
    <div class="common-title">{{ title }}</div>
    <div class="common-value">{{ value }}</div>
    <div class="common-card"><slot /></div>
    <div class="common-bottom"><slot name="bottom" /></div>
  </el-card>
</template>

<script lang="ts">
export default {
  name: "CommonCard",
};
</script>

<script lang="ts" setup>
defineProps<{
  title: string;
  value: number;
}>();
</script>

<style scoped>
.common-title {
  font-size: 12px;
  color: #999;
}
.common-value {
  font-size: 25px;
  margin: 5px 0;
  letter-spacing: 1px;
}
.common-bottom {
  border-top: 1px solid #eee;
  margin-top: 5px;
  padding-top: 10px;
  font-size: 12px;
  color: #666;
}
.common-card {
  height: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  padding: 5px;
  line-height: 20px;
  /* background-color: lightpink; */
}
</style>
